package com.ruubypay.activiti.service.impl;

import com.ruubypay.activiti.domain.InstanceBusiness;
import com.ruubypay.activiti.domain.TaskVo;
import com.ruubypay.activiti.mapper.TaskMapper;
import com.ruubypay.activiti.service.ITaskService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
@AllArgsConstructor
public class TaskServiceImpl  implements ITaskService {
    @Autowired
    private  TaskMapper taskMapper;

    @Override
    public List<Map> findTodoList(TaskVo taskVo) {
        return taskMapper.findTodoList(taskVo);
    }

    @Override
    public Integer findTodoCount(TaskVo taskVo) {
        return taskMapper.findTodoCount(taskVo);
    }

    @Override
    public List<Map> findDoneList(TaskVo taskVo) {
        return taskMapper.findDoneList(taskVo);
    }

    @Override
    public Integer findDoneCount(TaskVo taskVo) {
        return taskMapper.findDoneCount(taskVo);
    }

    @Override
    public int insertInstanceBusiness(InstanceBusiness instanceBusiness) {
        return taskMapper.insertInstanceBusiness(instanceBusiness);
    }

    @Override
    public Map<String, Object> selectInstanceBusinessByInstanceId(String instanceId) {
        return taskMapper.selectInstanceBusinessByInstanceId(instanceId);
    }

    @Override
    public Map<String, Object> selectBusinessByBusinessKeyAndModule(String id, String module) {
        return taskMapper.selectBusinessByBusinessKeyAndModule(id,module);
    }
}
